package com.mashibing.apidriver.remote;

import org.mashibing.dto.Car;
import org.mashibing.dto.DriverUser;
import org.mashibing.dto.ResponseResult;
import org.mashibing.response.DriverUserExistsResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @author:
 * @create: 2024/6/27 14:48
 * @description:
 */
@FeignClient("service-driver-user")
public interface ServiceDriverUserClient {

    @PutMapping("/user")
    ResponseResult updateUser(@RequestBody DriverUser driverUser);

    @GetMapping("/check-driver/{driverPhone}")
    ResponseResult<DriverUserExistsResponse> checkDriver(@PathVariable String driverPhone);

    @GetMapping( "/car")
    ResponseResult<Car> getCarById(@RequestParam Long carId);
}
